//
//  SABatchPurchaseDetailFooterView.m
//  saasRetail
//
//  Created by mac on 2022/10/19.
//

#import "SABatchPurchaseDetailFooterView.h"

@interface SABatchPurchaseDetailFooterView ()

@end

@implementation SABatchPurchaseDetailFooterView

- (instancetype)initWithReuseIdentifier:(NSString *)reuseIdentifier {
    if (self = [super initWithReuseIdentifier:reuseIdentifier]) {
        [self initUI];
    }
    return self;
}

-(void)clickedAddBtn {
    !self.addBlock ?: self.addBlock();
}

#pragma mark - initUI
-(void)initUI {
    
    UIView *line = [[UIView alloc] initWithFrame:CGRectMake(0, 1 * kScreenScale, kScreenWidth, 1)];
    line.backgroundColor = kLineColor;
    [self.contentView addSubview:line];
    
    UIButton *addBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    addBtn.frame = CGRectMake(0, kScaleNum(1), kScreenWidth, kScaleNum(40));
    [addBtn setTitle:@"添加商品SKU" forState:UIControlStateNormal];
    [addBtn setImage:[UIImage imageNamed:@"batch_add"] forState:UIControlStateNormal];
    [addBtn setTitleColor:kBlackColor forState:UIControlStateNormal];
    addBtn.titleLabel.font = kFont(16);
    [addBtn addTarget:self action:@selector(clickedAddBtn) forControlEvents:UIControlEventTouchUpInside];
    [self.contentView addSubview:addBtn];
}


@end
